<template>
  <!--老师/学生详情弹框-->
  <div class="edu-page-warp">
    <edu-dialog :title="viewType === 'TEACHER' ? $t('graduationDesign.viewTeacher') : $t('graduationDesign.viewStudent') " width="50%" @close="closeDialog" :visible="dialogVisible">
      <edu-table ref="viewDetailTable" :data="viewDetailData" :order="false" :selection="false" :pagination="false" v-if="viewType === 'TEACHER'">
        <edu-table-column :label="$t('graduationDesign.teacherCode')" prop="teacherId" min-width="100"></edu-table-column>
        <edu-table-column :label="$t('graduationDesign.teacherName')" prop="teacherName" min-width="100"></edu-table-column>
      </edu-table>
      <edu-table ref="viewDetailTable" :data="viewDetailData" :order="false" :selection="false" :pagination="false" v-else>
        <edu-table-column :label="$t('graduationDesign.studentCode')" prop="studentId" min-width="100"></edu-table-column>
        <edu-table-column :label="$t('graduationDesign.studentNameOther')" prop="studentName" min-width="100"></edu-table-column>
      </edu-table>
      <div slot="buttons">
        <el-button @click="closeDialog">{{$t('graduationDesign.close')}}</el-button>
      </div>
    </edu-dialog>
  </div>
</template>
<script>
export default {
  name: 'teacherStuInfoDialog',
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    },
    viewDetailData: {
      type: Array,
      default: []
    },
    viewType: {
      type: String,
      default: ''
    }
  },
  data() {
    return {};
  },
  mounted() { },
  methods: {
    closeDialog() {
      this.$emit("taacher-stu-close");
    }
  }
}
</script>
<style lang="scss" scoped>
</style>
